Block
Create a block file
To create a block file you create a file with an extension of .block in the customBlocks.
Attributes
id
The id attribute defines the id of the block.
This attribute must be set.
name
The name attribute defines the name of the block. This name is shown in game. This attribute must be set.
texturefile
The texturefile attribute defines the sprite sheet that is used by the block. The sprite sheet has to be a '.png' file. The size of the sprite sheet has to be 256x256 (for 16x16 textures), 128x128 (for 8x8 textures), 512x512 (for 32x32 textures), etc. If you want to use the vanilla minecraft block sprite sheet, you set it to 'terrain.png'. The default value is "terrain.png".
textureindex
The textureindex attribute defines the texture in the texturefile that is used for the block. This is also the bottom texture if you use different textures on different sides. The top left texture is 0 the one right to it is 1 and so on. This attribute must be set.
textureindexeast
The textureindexeast attribute defines the texture in the texturefile that is used for the block's east side.
textureindexwest
The textureindexwest attribute defines the texture in the texturefile that is used for the block's west side.
textureindexnorth
The textureindexnorth attribute defines the texture in the texturefile that is used for the block's north side.
textureindexsouth
The textureindexsouth attribute defines the texture in the texturefile that is used for the block's south side.
texturebottomindex
The texturebottomindex attribute defines the bottom texture in the texturefile that is used for the door.
chesttextureindex
The chesttextureindex attribute defines texture for a chest (see this).
type
The type attribute defines the block's type. Valid values are normal, door, stairs, fence, slab, crosstexture, torch, chest, pressureplate, pane, ladder, trapdoor, fencegate, liquid and simple. The default value is "normal".
material
The material attribute defines the block's material. Valid values are grass, ground, wood, rock, iron, cloth, sand, glass, lava and water. The default value is "rock".
stepsound
The type attribute defines the block's stepsound and mine sound. Valid values are grass, stone, wood, metal, cloth, gravel and glass. The default value is "stone".
damagevalues
The damagevalues attribute defines how many damage values the block uses (max 15). The default value is 0.
redstoneonly
The redstoneonly attribute defines if the door/trapdoor/fencegate can only be opened by redstone. The default value is false.
doubleslabid
The doubleslabid attribute defines the id of the block that is generated if two slabs are placed on top of each other.
doubleslabdamage
The doubleslabdamage attribute defines the damage value of the block that is generated if two slabs are placed on top of each other.
hardness
The hardness attribute defines how long it will take to harvest this block. The default value is 1.0.
resistance
The resistance attribute defines the resistance against explosions.
light
The light attribute defines how much light the block does emit (0 to 15). The default value is 0.
opacity
The opacity attribute defines how much light goes through the block. 0 means all 255 means nothing. The default value is 255.
iddropped
The iddropped attribute defines the id that is dropped when the block was destroyed.
quantitydropped
The quantitydropped attribute defines the amount that is dropped when the block was destroyed.
damagedropped
The damagedropped attribute defines the damage value that is dropped when the block was destroyed.
transparent
If your block has a transparent texture you have to set this to true.
speed
The speed attribute defines how fast you can walk on the block. The default value is 0.6.
gravity
The gravity attribute defines if the block has gravity (like sand). Valid values are true and reverse.
collision
Set this to false and you can walk through the block.
movebypiston
Set this to false and the block can't be moved by a piston.
pressureplatetrigger
The pressureplatetrigger attribute defines what the pressure plate can trigger. Valid values are all, player, monster, animal, creature, item, noplayer, nomonster, noanimal, nocreature, noitem. The default value is all.
container
The container attribute defines what container the block uses. use the name of the container for this.
color
The color attribute colors the block.
id2
The id2 attribute defines the 2nd id of the liquid.
flowspeed
The flowspeed attribute defines how fast the liquid is flowing. The higher the slower. The default value is 5.
tickrate
The tickrate attribute defines how fast the update trigger is called. The higher the slower.
infinitesource
The infinitesource attribute defines if the liquid can make infinite sources like water does. The default value is true.
addtocreative
The addtocreative attribute defines if the block is added to creative inventory.
The toolclass attribute defines what toolclasses the block can mine. You can set multiple ones by dividing with a ','.
harvestlevel
The toolclass attribute defines what toolclasses the block can mine. You can set multiple ones by dividing with a ','.
Script triggers
destroyed
This trigger is called when the player destroys the block. You can use world and origin.
clicked
This trigger is called when the player left clicks the block. You can use world, origin and player.
neighborchanged
This trigger is called when a neighborblock was changed. You can use world and origin.
added
This trigger is called when the block was added. You can use world and origin.
activated
This trigger is called when the block was activated with redstone. You can use world and origin.
deactivated
This trigger is called when the block was deactivated with redstone. You can use world and origin.
rightclicked
This trigger is called when the block was rightclicked. You can use world, origin and player.
update
This trigger is called frequently. You can use world and origin.
crafted
This trigger is called when the block was taken from a crafting table. You can use world and origin.